<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main"/>
    <g:set var="entityName" value="${message(code: 'riskWarningLevel.label', default: 'RiskWarningLevel')}"/>
    <title>风险等级详情</title>
    <style>
    .checkboxGroup {
        display: inline-block;
        padding: 7px 10px;
    }
    </style>
</head>

<body>
<div class="small-header">
    <div class="hpanel">
        <div class="panel-body">
            <div id="hbreadcrumb" class="pull-right">
                <ol class="hbreadcrumb breadcrumb">
                    <li>CINDATA</li>
                    <li>
                        <g:link controller="riskWarningLevel" action="index">风险等级</g:link>
                    </li>
                    <li class="active">
                        <span>风险等级详情</span>
                    </li>
                </ol>
            </div>

            <h2 class="font-light m-b-xs">
                风险等级: ${this.riskWarningLevel.name}
            </h2>
        </div>
    </div>
</div>

<div class="content animate-panel">

    <div class="row">
        <g:if test="${flash.message}">
            <div class="message alert alert-info" role="status">${flash.message}
                <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
            </div>
        </g:if>
        <div class="hpanel hred contact-panel">
            <div class="panel-heading">
                <div class="panel-tools">
                    <g:link class="btn btn-info btn-xs" action="edit" resource="${this.riskWarningLevel}"><i class="fa fa-edit"></i>编辑</g:link>
                </div>
                风险等级详情
            </div>

            <div class="panel-body">
                <div class="text-muted font-bold m-b-xs ol-md-6">
                    <div class="col-md-12">
                        <h4>
                            <a href=>${this.riskWarningLevel?.name}</a>
                        </h4>
                    </div>
                </div>
            </div>

            <div class="panel-footer contact-footer">
                <div class="row">

                    <div class="col-md-3 border-right">
                        <div class="contact-stat">
                            <span>执行周期</span>
                            <strong>${this.riskWarningLevel?.executeCycle} 天</strong>
                        </div>
                    </div>

                    <!-- <div class="col-md-3 border-right">
                        <div class="contact-stat">
                            <span>工作流</span>
                            <strong>${this.riskWarningLevel?.workflow?.name}</strong>
                        </div>
                    </div> -->

                    <div class="col-md-3 border-right">
                        <div class="contact-stat">
                            <span>描述</span>
                            <strong>${this.riskWarningLevel?.description}</strong>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="hpanel hyellow collapsed">
            <div class="panel-heading hbuilt">
                <div class="panel-tools">
                    <g:link class="btn btn-info btn-xs" controller="riskWarningLevelRule" action="create" params="[riskWarningLevel: this.riskWarningLevel?.id]">
                        <i class="fa fa-plus"></i>新增
                    </g:link>
                    <a class="showhide">
                        <i class="fa fa-chevron-up"></i>
                    </a>
                </div>
                等级规则
            </div>

            <div class="panel-body no-padding" style="display: block">
                <div class="table-responsive">
                    <table class="table table-striped table-bordered table-hover text-center">
                        <thead>
                        <tr>
                            <g:sortableColumn property="executionSequence" title="规则名称"/>
                            <g:sortableColumn property="description" title="规则描述"/>
                            <g:sortableColumn property="stage" title="优先级"/>
                            <g:sortableColumn property="component" title="组件名称"/>
                            <g:sortableColumn property="message" title="组件描述"/>
                            <g:sortableColumn width="8%" property="operation" title="${message(code: 'workflowStage.operation.label', default: '操作')}"/>
                        </tr>
                        </thead>
                        <tbody>
                        <g:each in="${com.cindata.RiskWarningLevelRule.findAllByRiskWarningLevel(this.riskWarningLevel, [sort:'priority', order: 'asc'])}">
                            <tr class="text-center">
                                <td><g:link controller="riskWarningLevelRule" action="show" id="${it?.id}">${it?.name}</g:link></td>
                                <td>${it?.description}</td>
                                <td>${it?.priority}</td>
                                <td>${it?.component?.name}</td>
                                <td>${it?.component?.message}</td>
                                <td class="text-center">
                                    <g:form controller="riskWarningLevelRule" action="delete" id="${it.id}" method="DELETE">
                                        <button class="deleteBtn btn btn-danger btn-xs btn-outline" type="button">
                                            <i class="fa fa-trash-o"></i> 删除</button>
                                    </g:form>
                                </td>
                            </tr>
                        </g:each>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>

</div>
</body>
</html>



